#include <iostream>
#include <cmath>
using namespace std;

int sales[9]; //make sure elements are initialized

int main()
{
    int in;

    cout.setf (ios::fixed);
    cout.precision (2);
    cout << "Enter employee gross sales (-1 to end): ";

    while (cin >> in)
    {
        if (in == -1) break;
        double commission = 200.0 + in * 0.09;
        if (in*9 < 80000)
            sales[in*9/10000]++;
        else
            sales[8]++;
        cout << "Employee Commission is $" << commission << endl << endl;

        cout << "Enter employee gross sales (-1 to end): ";
    }

    cout << "Employee in the range:\n"
         << "$200-$299 : " << sales[0] << endl
         << "$300-$399 : " << sales[1] << endl
         << "$400-$499 : " << sales[2] << endl
         << "$500-$599 : " << sales[3] << endl
         << "$600-$699 : " << sales[4] << endl
         << "$700-$799 : " << sales[5] << endl
         << "$800-$899 : " << sales[6] << endl
         << "$900-$999 : " << sales[7] << endl
         << "Over $1000: " << sales[8] << endl;

    return 0;
}
